package com.itheima.widget;

import com.itheima.widget.utils.AppCacheUtil;
import com.itheima.widget.utils.AppInfo;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	public void readcache(View view) {
		AppInfo info=new AppInfo();
		info.packageName="com.qihoo.browser";
		AppCacheUtil.getAppCacheSize(this, info);
		Log.i("wzx", info.cacheSize+"");
	}
	public void deletecache(View view) {
		AppInfo info=new AppInfo();
		info.packageName="com.qihoo.browser";
		
		AppCacheUtil.deleteCacheFile(this, info);
	}
	public void deletall(View view) {

		AppCacheUtil.deleteAppsCacheFiles(this);
	
	}

}
